<template>
  <div>
    <input type="text" v-model="searchValue">
    <ul>
      <li v-for="(v, i) in searchList" :key="i">{{ v }}</li>
    </ul>

    
  </div>
</template>

<script>
// import Counter from './components/Counter.vue'
import axios from 'axios'
export default {
  components: {
    // Counter
  },
  data() {
    return {
      count: 1,
      list: [],
      searchValue: '黄'
    }
  },
  methods: {
    ttt() {
      this.count++
    }
  },
  created() {
    axios.get('/list').then(resp => {
      console.log(resp.data);
      this.list = resp.data
    })
  },
  computed: {
    searchList() {
      return this.list.filter(item => item.includes(this.searchValue))
    }
  }

}
</script>